package com.mallplus.api.leaf.feign;

import com.mallplus.common.core.feign.FeignInsideAuthConfig;
import com.mallplus.common.core.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Hanson
 * @date 2023/4/16 18:14
 */
@FeignClient(value = "mallplus-cloud-leaf",contextId = "segment")
public interface SegmentFeignClient {

    /**
     * 获取id
     * @param key
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDE_URL_PREFIX + "/insider/segment")
    ServerResponseEntity<Long> getSegmentId(@RequestParam("key") String key);
}
